fs/hfsplus: Set a grub_errno if mount fails
authorB Horn <b@horn.uk>
Sun, 12 May 2024 05:22:51 +0000 (06:22 +0100)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit11d7e4922b0a348cd87ce96cb3fa75e770905dc0
tree8321ae46eec1a3a51f7a1e22082a2c5e12dcb4f2
parent79c335371d91373d767bbbcfeb1a61e2a4dd306e
fs/hfsplus: Set a grub_errno if mount fails

It was possible for mount to fail but not set grub_errno. This led to
a possible double decrement of the module reference count if the NULL
page was mapped.

Fixing in general as a similar bug was fixed in commit 61b13c187
(fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there
are likely more variants around.

Fixes: CVE-2024-45783
Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-hfsplus-Set-a-grub_errno-if-mount-fails.patch
grub-core/fs/hfsplus.c